const shareRequest = require("../utils/shareRequest.js")
/**
 * 用户微信授权检查
 */
let userInfoGet = (data) => {
  return shareRequest.post("/rainbowdb/user/getUserInfo", data)
}
/**
 * 用户授权注册
 */
let addUser = (data) => {
  return shareRequest.post("/rainbowdb/user/addUser", data)
}

/**
 * 获取邀请码
 */
let getInviteCode = (data) => {
  return shareRequest.post("/rainbowdb/invitecode/getInviteCode", data)
}
/**
 * 验证邀请码
 */
let validateInviteCode = (data) => {
  return shareRequest.post("/rainbowdb/invitecode/validateInviteCode", data)
}
/**
 * 添加推荐好友预约表单
 */
let addOrder = (data) => {
  return shareRequest.post("/rainbowdb/order/addOrder", data)
}
/**
 * 获取推荐奖励说明列表
 */
let getRewards = (data) => {
  return shareRequest.post("/rainbowdb/reward/getRewards", data)
}
/**
 * 获取简介列表
 */
let getSynopsis = (data) => {
  return shareRequest.post("/rainbowdb/synopsis/getSynopsis", data)
}
/**
 * 获取推荐好友预约列表
 */
let getOrderList = (data) => {
  return shareRequest.post("/rainbowdb/order/getOrderList", data)
}
/**
 * 获取活动列表
 */
let getPromotions = (data) => {
  return shareRequest.post("/rainbowdb/promotion/getPromotions", data)
}
/**
 * 获取参加活动的结束时间
 */
let getOverDate = (data) => {
  return shareRequest.post("/rainbowdb/order/getOverDate", data)
}
/**
 * 获取openid
 */
let getOpenId = (data) => {
  return shareRequest.post("/rainbowdb/wx/getOpeniId", data)
}
/**
 * 修改用户信息
 */
let userUpdate = (data) => {
  return shareRequest.post("/rainbowdb/user/updateUser", data)
}
/**
 * 获取新闻列表
 */
let getNews = (data) => {
  return shareRequest.post("/rainbowdb/news/getNews", data)
}
/**
 * 获取新闻详情
 */
let getNewsInf = (data) => {
  return shareRequest.post("/rainbowdb/news/getNewsInf", data)
}
/**
 * 检测手机号码是否已经注册
 */
let checkUser = (data) => {
  return shareRequest.post("/rainbowdb/user/checkUser", data)
}
/**
 * 获取业务员推荐所有的会员列表
 */
let getSalesmanOrderList = (data) => {
  return shareRequest.post("/rainbowdb/order/getSalesmanOrderList", data)
}
/**
 * 获取轮播图片列表
 */
let getCarousels = (data) => {
  return shareRequest.post("/rainbowdb/carousel/getCarousels", data)
}

/**
 * 业务员修改备注和状态
 */
let getUpdateOrder = (data) => {
  return shareRequest.post("/rainbowdb/order/updateOrder", data)
}

module.exports = {
  userInfoGet: userInfoGet,
  addUser: addUser,
  getInviteCode: getInviteCode,
  validateInviteCode: validateInviteCode,
  addOrder: addOrder,
  getRewards: getRewards,
  getSynopsis: getSynopsis,
  getOrderList: getOrderList,
  getOverDate: getOverDate,
  getPromotions: getPromotions,
  getOpenId: getOpenId,
  userUpdate: userUpdate,
  getNews: getNews,
  getNewsInf: getNewsInf,
  checkUser: checkUser,
  getSalesmanOrderList: getSalesmanOrderList,
  getCarousels: getCarousels,
  getUpdateOrder: getUpdateOrder
}